<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<link href="/resource/css/admin/main.css" type="text/css" rel="stylesheet" />
<link href="/resource/css/admin/right.css" type="text/css" rel="stylesheet" />
<script type="text/javascript" src="/resource/js/jquery.js"></script>
<script type="text/javascript" src="/resource/js/base.js"></script>
<script type="text/javascript" src="/resource/js/admin/vote.js"></script>
</head>
<body>
	<div class="position"><span>您的当前位置：</span>辅助插件 > 网上投票管理</div>
	<div class="rightbody f">
		<div class="rightbodycontent">
			<table class="tools">
		        <tr>
		            <td>
   						<form name="form_vote" method="post" action="update">
							主题：
							<input type="text" name="title" id="title" value="${vote.title!}" size="100" />
							<a onclick="submit()" class="linkbtn save">更新</a>
   						</form>
	                </td>
		            <td align="right">
		                <a href="../voteoption/edit" class="linkbtn insert">新建投票项</a>
		            </td>
		        </tr>
		    </table>
		    <table cellspacing="1" cellpadding="4" class="tablelist">
		        <tr>
		            <th width="40%">投票选项</th>
				    <th>投票数</th>
				    <th>投票数比例</th>
				    <th>排序</th>
				    <th>操作</th>
		        </tr>
		        <#list voteoptions as voteoption>
		        	<tr<#if voteoption_index % 2 == 1> class="splittr"</#if>>
		        		<td align="center">${voteoption.contents}</td>
		                <td align="center">${voteoption.poll}</td>
		                <td align="center"><div<#if polltotal gt 0> style="width:${voteoption.poll / polltotal * 100}px; height:10px; background:red;"</#if>></div></td>
		                <td align="center">${voteoption.sort}</td>
		                <td align="center">
		                    <a href="../voteoption/edit?voteoptionid=${voteoption.id}" class="linkbtn update noborder">修改</a>
		                    <a href="../voteoption/delete?voteoptionid=${voteoption.id}" class="linkbtn delete noborder" onclick="return confirm('确定删除吗？')">删除</a>
		                </td>
		        	</tr>
		        </#list>
		    </table>
	    </div>
    </div>
</body>
</html>